<?php 
include '../data/data.php';
$user=$_SESSION['user']; //获取到的用户名
$pass=$_SESSION['pass']; //获取到的密码
$result= mysql_query("SELECT * FROM user WHERE username='$user'", $link);  
$row = mysql_fetch_array($result);
?>
<html><head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>我的个人中心 - <?php echo $rowx[name]; ?></title>
    <link rel="stylesheet" href="/public/styles/base.css">
    <link rel="stylesheet" href="/styles/user_center.css">
    <link rel="stylesheet" href="/css/new.css">
<style>
    .bacv{
        width: 100%;
        height: 80px;
        margin-bottom: 10px;
    }
    .bacv{
    }
    .bacv>div{
        height: 80px;
        float: left;
        text-align: center;
        font-size: 13px;
        margin:0 6px;
    }
</style></head>

<body style="">
    <div style="width: 100%;height: 120px;">
        <img style="width: 100%;height: 120px;" src="/picture/user_b.png" alt="">
    </div>
  <?php 
  if($pass==$row['password']){
     if($row['password']!=''){
    ?>
    <div style="width: 90%;height: 160px;margin-left: 5%;position: absolute;top: 43px;background:rgba(255,255,255,1);box-shadow:0px 0px 15px 0px rgba(44,44,44,0.2);border-radius:8px;">
                <div style="width: 56px;height: 56px;background: #fff;position: absolute;top: -35.5px;border-radius:50%;left: 131px;padding: 7.5px;">
            <img style="width: 56px;height: 56px;border-radius: 50%;" src="/images/user_center/default_img.png" alt=""></a>
        </div>
        <div>
            <p style="font-size: 15px;color:#666666;font-weight: 800;margin-top: 43px;text-align: center"><a style="color: #666" href="/user/edit.html"><?php echo $row[username]; ?><?php if($row[gm]=='5'){echo '<img src="\picture\svip.png">';} ?><img style="width: 6px;height: 11.5px;margin-left: 10px;" src="/picture/icon_15.png" alt=""></p>
        </div>
        <div style="width: 100%;text-align: center;margin-top: 25px;">
            <div style="width: 49%;float: left;height: 45px;border-right: 1px #F4F4F4 solid;">
                <p style="color: #000;font-size: 14px;">积分币</p>
                <p style="color: #FF7200;margin-top: 7px;font-size: 18px;"><?php echo $row[jifen]; ?></p>
            </div>

            <div style="width: 50%;float: left;height: 45px;">
                <p style="color: #000;font-size: 14px;">平台币</p>
                <p style="color: #FF7200;margin-top: 7px;font-size: 18px;"><?php if($row[gm]=='5'){echo 'SVIP';}else{echo $row[money];} ?></p>
            </div>
            <div style="clear: both"></div>
        </div>
            </div>
  <?php
     }}?>
  <?php 
  if($row['password']==''){
  ?>
   <div style="width: 90%;height: 160px;margin-left: 5%;position: absolute;top: 43px;background:rgba(255,255,255,1);box-shadow:0px 0px 15px 0px rgba(44,44,44,0.2);border-radius:8px;">
                    <div style="width: 56px;height: 56px;background: #fff;position: absolute;top: -35.5px;border-radius:50%;left: 131px;padding: 7.5px;">
                <a href="#"><img style="width: 56px;height: 56px;border-radius: 50%;" src="/images/user_center/default_img.png" alt=""></a>
            </div>
            <div>
                <p style="font-size: 15px;color:#666666;font-weight: 500;margin-top: 43px;text-align: center">登录领福利，金币享不停
                       </p>
            </div>
            <div style="margin-top: 34px;">
                <div style="float: left;margin-left: 22px;">
                    <a href="/user/login.html?fwd=/user/user.html"><p style="width:131px;height:37px;background:linear-gradient(0deg,rgba(66,140,199,1) 0%,rgba(77,175,254,1) 100%);border-radius:37px;font-size: 16px;text-align: center;color: #ffffff;line-height: 37px;">登录</p></a>
                </div>
                <div style="float: left;margin-left: 25px;">
                    <a href="/user/register.html?fwd=/user/user.html"><p style="width:131px;height:37px;border:1px solid rgba(224,223,223,1);background:linear-gradient(0deg,rgba(231,231,231,1) 0%,rgba(255,255,255,1) 100%);border-radius:37px;font-size: 16px;text-align: center;color: #333;line-height: 37px;">注册</p></a>
                </div>
                <div style="clear: both"></div>
            </div>
            </div>

<?php } ?>

    <div style="width: 100%;margin-top: 120px;height: 300px;">
        <div class="bacv">
            <div style="width: 30%">
                <a href="javascript:void(0);" class="qd_dt">
                    <p><img style="width: 25px;height: 25px;" src="/picture/user_qd.png" alt=""></p>
                    <p style="margin-top: 10px;color: #000">
                        签到
                    </p>
                </a>
            </div>
            <div style="width: 30%">
                <a href="/pay/deposit.html">
                    <p><img style="width: 27px;height: 28px;" src="/picture/user_pay.png" alt=""></p>
                    <p style="margin-top: 7px;color: #000">兑换中心</p>
                </a>
            </div>
            <div style="width: 30%">
                <p><a href="/user/paylogs.html">
                        <img style="width: 24px;height: 25px;" src="/picture/user_lo.png" alt="">
                    </a></p>
                <p style="margin-top: 10px;"><a href="/user/paylogs.html" style="color: #000">
                        兑换记录
                    </a></p>
            </div>
        </div>
        <div class="bacv">
            <div style="width: 30%"><a href="/user/server.html">
                <p>
                        <img style="width: 26px;height: 27px;" src="/picture/user_kf.png" alt="">
                    </p>
                <p style="margin-top: 8px;color: #000;">
                        客服返利
                    </p>
                </a>
            </div>
            <div style="width: 30%"><a href="/user/feedbackList.html">
                <p>
                        <img style="width: 26px;height: 27px;" src="/picture/user_mo.png" alt="">
                    </p>
                <p style="margin-top: 8px;color: #000;">
                        反馈记录
                    </p>
                </a>
            </div>
            <div style="width: 30%">
                <p><a href="/user/games.html">
                        <img style="width: 28px;height: 21px;" src="/picture/user_pl.png" alt="">
                    </a></p>
                <p style="margin-top: 14px;"><a href="/user/games.html" style="color: #000">
                        最近在玩
                    </a></p>
            </div>
          <div style="width: 30%">
                <p><a href="/user/shop.html">
                        <img style="width: 28px;height: 21px;" src="/picture/user_gi.png" alt="">
                    </a></p>
                <p style="margin-top: 14px;"><a href="/user/shop.html" style="color: #000">
                        积分兑换
                    </a></p>
            </div>
          <div style="width: 30%">
                <p><a href="/user/tui.html">
                        <img style="width: 28px;height: 21px;" src="/picture/user_gi.png" alt="">
                    </a></p>
                <p style="margin-top: 14px;"><a href="/user/tui.html" style="color: #000">
                        分享奖励
                    </a></p>
            </div>

        </div>
        <div style="clear: both;"></div>
    </div><?php
$time=date("w",time( ));
$array = ["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];
$time=date("w",time( ));
  if($array[$time]=='星期一'){
$xq1='dnhon';$xq2='';$xq3='';$xq4='';$xq5='';$xq6='';$xq7='';
  }elseif($array[$time]=='星期二'){
$xq1='';$xq2='dnhon';$xq3='';$xq4='';$xq5='';$xq6='';$xq7='';
  }elseif($array[$time]=='星期三'){
$xq1='';$xq2='';$xq3='dnhon';$xq4='';$xq5='';$xq6='';$xq7='';
  }elseif($array[$time]=='星期四'){
$xq1='';$xq2='';$xq3='';$xq4='dnhon';$xq5='';$xq6='';$xq7='';
  }elseif($array[$time]=='星期五'){
$xq1='';$xq2='';$xq3='';$xq4='';$xq5='dnhon';$xq6='';$xq7='';
  }elseif($array[$time]=='星期六'){
$xq1='';$xq2='';$xq3='';$xq4='';$xq5='';$xq6='dnhon';$xq7='';
  }elseif($array[$time]=='星期天'){
$xq1='';$xq2='';$xq3='';$xq4='';$xq5='';$xq6='';$xq7='dnhon';
  }
?>
    <div class="qd_day">
        <div class="qd_new"></div>
        <div style="position: relative;width: 100%;height: 430px;margin-top: 25%;">
            <div class="qd_img">
            </div>
            <div class="serial">
                <div>
                    已签到 <span style="color: #0E9FFE"><?php 
$sql = "select count(*) from qiandao where user LIKE '$user'";
$row0 = mysql_fetch_array( mysql_query($sql) );
  if(isset($row0[0])){
    echo $row0[0];
}else{
echo '0';
}
?></span> 天
                </div>
                <p>每周一 <span style="color: #FF0000">重置</span>签到奖励，第三第七日 <span style="color: #FF0000">更多</span>赠送</p>
            </div>
            <div class="fistd" id="devot">
                                    <div class="<?php echo $xq1; ?>" style="">
                        <div class="scvji" style="">

                                                            <h5>星期一</h5>
                                <img src="/picture/money_02.png" height="30" width="30" alt="">
                                                        <p style=""><?php echo $qd['1']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                            <div id="dtech"></div>
                                                        <div class="<?php echo $xq2; ?>" style="">
                        <div class="scvji" style="">

                                                            <h5>星期二</h5>
                                <img src="/picture/money_02.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['2']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                            <div id="dtech"></div>
                                                        <div class="<?php echo $xq3; ?>" style="background-image:url('../picture/icon_27.png');background-repeat: no-repeat;">
                        <div class="scvji" style="">

                                                            <h5 style="margin-bottom: 5px;">星期三</h5>
                                <img src="/picture/money_01.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['3']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                            <div id="dtech"></div>
                                                        <div class="<?php echo $xq4; ?>" style="">
                        <div class="scvji" style="">

                                                            <h5>星期四</h5>
                                <img src="/picture/money_02.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['4']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                                        <div class="<?php echo $xq5; ?>" style="">
                        <div class="scvji" style="">

                                                            <h5>星期五</h5>
                                <img src="/picture/money_02.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['5']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                            <div id="dtech"></div>
                                                        <div class="<?php echo $xq6; ?>" style="">
                        <div class="scvji" style="">

                                                            <h5>星期六</h5>
                                <img src="/picture/money_02.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['6']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                            <div id="dtech"></div>
                                                        <div class="<?php echo $xq7; ?>"  style="background-image:url('../picture/icon_27.png');background-repeat: no-repeat;width:130px;">
                        <div class="scvji" style="width: 135px;">

                                                            <h5 style="margin-bottom: 5px;">星期天</h5>
                                <img src="/picture/money_01.png" alt="" height="30" width="30">
                                                        <p style=""><?php echo $qd['7']; ?>积分币</p>
                        </div>
                                                                                                </div>
                                                </div>
                            <div onclick="qd()" class="noenr">
                    立即签到
                </div>
                    </div>

    </div>
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="" id="footer_nav_active">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>
<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->
<script>


    /**
     * 统计
     */

    // var is_weixin = (function(){return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1})();
    // window.onload = function() {
    //     if (is_weixin) {
    //         $('#weixin_an').show();
    //     }
    // }
</script>

<script src="/public/scripts/jquery-1.11.1.min.js"></script>

    <script>
        $('#footer a:eq(5)').attr('id', 'footer_nav_active');
      <?php 
      if($row['password']==$pass){
        if($row['password']!=''){
      ?>
       $('.qd_dt').click(function(){
       $('.qd_day').css('display','block');
       });
      <?php
        }
      }
      ?>

        function qd(){
            var gid = $('.g_day').attr('id');
            uid='<?php echo $user; ?>';
            // alert(uid);
            $.ajax({
                type: 'POST',
                url: '/user/ajaxqd.html',
                data: 'user_id='+uid,
                dataType: 'json',
                success: function(msg){
                    alert(msg.log);location.href='/user/user.html';
                    if(msg.msg==true){
                        // alert(msg.msg);
                        location.reload();
                    }
                },
                error: function(){
                    loading = false;
                    alert('奖励领取失败，请重试！');

                },
            });
        }
        $('.qd_day').click(function(){
            $(this).css('display','none');
        });
    </script>

</body></html>